/**
 * CopyRight © 2012 USTC SINOVATE SOFTWARE CO.LTD All Rights Reserved.
 */

package com.cmcc.zysoft.infocollection.dao;

import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;
import com.cmcc.zysoft.infocollection.model.Cities;
import com.starit.common.dao.hibernate.HibernateBaseDaoImpl;

/**
 * @author 袁凤建
 * <br />邮箱: yuan.fengjian@ustcinfo.com
 * <br />描述: CitiesPcDao.java
 * <br />版本: 1.0.0
 * <br />日期: 2013-8-28 下午5:30:19
 * <br />CopyRight © 2012 USTC SINOVATE SOFTWARE CO.LTD All Rights Reserved.
 */

@Repository
public class CitiesPcDao extends HibernateBaseDaoImpl<Cities, Integer> {
	
	@Autowired
	private JdbcTemplate jdbcTemplate;

	/**
	 * 根据省份ID查找城市信息.
	 * @param provinceId 省份ID
	 * @return List<Map<String, Object>>
	 */
	public List<Map<String, Object>> cities(String provinceId) {
		String sql = "SELECT a.* FROM cities a WHERE a.provinceid = ?";
		return this.jdbcTemplate.queryForList(sql, provinceId);
	}
}